package com.example.springboot.mapper;

import com.example.springboot.controller.requests.BaseRequst;
import com.example.springboot.controller.requests.LoginRequest;
import com.example.springboot.entity.Admin;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface AdminMapper {
//    @Select("select * from user")
    List<Admin> list();

    List<Admin> listBycondition(BaseRequst baseRequst);

    void save(Admin user);

    Admin getByid(Integer id);

    void updateById(Admin user);

    void deleteByid(Integer id);
    Admin getByUsernameAndPassword(LoginRequest loginRequest);

    void updatePass(Admin user);
}
